<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>


<html:html>
<head>
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/stkissue2.css" />

<script type="text/javascript" >
function returnToMainForm(lineNumber, itemOffset) {
	
	var	itemCode	= 	document.getElementById("itemCode"+itemOffset).innerHTML;

	opener.document.getElementById("docNo"+lineNumber).value = itemCode;								
	
	window.close(); 
}
</script>
<style>

.odd{background-color:#fFA700; }
.even{background-color:#EE0000; }

.menu-over{background-color:#64b1ff;}

</style>	
</head>

<body onload="document.getElementById('itemFind').focus();"><br />
	<center>
	
		<div>
		<center>รายการรอจ่าย</center>
		<table border="1">			
			<tr><td colspan="2">ค้นหาพบ  ${allElement } ระเบียน</td>
				<td align="right" colspan="3">หน้า ${currentPage }/${lastPage }</td></tr>
			<tr><td colspan="5">
					<logic:empty name="firstPage">หน้าแรก</logic:empty>
					<logic:notEmpty name="firstPage">			
						<html:link action="/stock.do?mode=docNoFind&docNoType=${docNoType}&page=${FirstPage }&itemFind=${itemFind }&maxEntriesPerPage=${maxEntriesPerPage }&line=${line }" >หน้าแรก</html:link>
					</logic:notEmpty>
					<logic:empty name="previousPage">ถอยหลัง</logic:empty>
					<logic:notEmpty name="previousPage">
						<html:link action="/stock.do?mode=docNoFind&docNoType=${docNoType}&page=${previousPage }&itemFind=${itemFind }&maxEntriesPerPage=${maxEntriesPerPage }&line=${line }" >ถอยหลัง</html:link>					
					</logic:notEmpty>										
					<logic:empty name="nextPage">ถัดไป</logic:empty>
					<logic:notEmpty name="nextPage">						
						<html:link action="/stock.do?mode=docNoFind&docNoType=${docNoType}&page=${nextPage }&itemFind=${itemFind }&maxEntriesPerPage=${maxEntriesPerPage }&line=${line }" >ถัดไป</html:link>
					</logic:notEmpty>										
					<logic:empty name="lastPage">หน้าสุดท้าย</logic:empty>
					<logic:notEmpty name="lastPage">
						<html:link action="/stock.do?mode=docNoFind&docNoType=${docNoType}&page=${lastPage }&itemFind=${itemFind }&maxEntriesPerPage=${maxEntriesPerPage }&line=${line }" >หน้าสุดท้าย</html:link>
					</logic:notEmpty>
											
				</td>
			</tr>
			<tr class="odd">
				<td width="20">No.</td>
				<td width="150">docNo</td>
				<td>Code</td>
				<td>Qty</td>
				
			</tr>
			<logic:notEmpty name="itemResults">
				<logic:iterate id="var" name="itemResults" indexId="id">
					
						<tr onmouseover="this.className='menu-over'" 
							onmouseout="this.className='even'" class="even">
							<td>${id+1+offset }.</td>
							<td>${var.docNo }</td>
							<td>${var.itemCode }</td>
							<td>${var.qty }</td>
							
						</tr>
				</logic:iterate>
			</logic:notEmpty>
		</table>
		
		</div>
		
		
	</center>
					

<input type="hidden" value="${monthFind }" id="monthFindId">
<script type="text/javascript">

	var item2 = document.getElementById("monthFindId").value;	
	document.formSearch.monthFind[item2-1].selected=true;
	
</script>



</body>

</html:html>